import os

iosSizes = ['27@1x','27@2x','27@3x','40@1x','40@2x','40@3x','60@1x','60@2x','60@3x','76@1x','76@2x','167@1x']
foldersiOS = ['iPhone4s','iPhone5','iPhone6','iPhone6plus','iPad','iPadLarge']
for a in foldersiOS:
    if not os.path.isdir(foldersiOS[1]):
        os.mkdir(foldersiOS[1])

for i in iosSizes:
    #orSize = i.split('@')#原始尺寸['27', '1x']  然后
    orSize =int(i.split("@")[0])  #输出是str类型，所以要用int转一次
    print(orSize,type(orSize))

for size in iosSizes:
    #print(size[1])
    pass
print (iosSizes[-1])
print(size)#167@1x
print (size.split("@")[0])#167

def walk_dir(dir,platform):
    files =os.listdir(dir)
    for name in files:
        pass

#判断是否有这个目录，没有的话创建1个
if not os.path.isdir('android'):
    os.mkdir('android')